package com.usian.scheduled;


import com.usian.controller.UserController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class ScheduledDemo {
//    private static final Logger logger= LoggerFactory.getLogger(ScheduledDemo.class);
//    @Scheduled(cron = "0/2 * * * * ?")
//    private void scheduled(){
//        //任务执行的内容
//        logger.info("定时执行："+new Date());
//    }
}
